/**
* <p>Title: Hole</p>
* <p>Description: CS343 Project</p>
* @author Derek Meisner
* @author Conor Lauer
* @author Derek Thompson
* @email meis0056@umn.edu
* @email conor.lauer@my.uwrf.edu
* @email derek.thompson-1@my.uwrf.edu
* @date 11/14/2012
* @team Derek, Conor, Derek
*/

package golfScore;

import java.io.Serializable;

public class Hole implements Serializable{

	/**
	   *Data members
	   */
	private static final long serialVersionUID = 1L;
	private int totalDistance;
	private int par;
	private String holeHead;
	private int holeVal;
	private int handicap;
	
	/**
	   * Constructor
	   * @require dist > 0, par > 0, holeVal > 0, handicap > 0
	   * @ensure 
	   */
	public Hole(int dist, int par, String holeHead, int holeVal, int handicap){
		assert(dist > 0);
		assert(par > 0);
		assert(holeVal > 0);
		assert(handicap > 0);
		this.setTotalDistance(dist);
		this.setPar(par);
		this.setHoleHead(holeHead);
		this.setHoleVal(holeVal);
		this.setHandicap(handicap);
	}

	/**
	   * sets total distance
	   * @require totalDistance > 0
	   * @ensure 
	   */
	public void setTotalDistance(int totalDistance) {
		assert(totalDistance > 0);
		this.totalDistance = totalDistance;
	}

	/**
	   * gets total distance
	   * @require
	   * @ensure totalDistance > 0
	   */
	public int getTotalDistance() {
		assert(totalDistance > 0);
		return totalDistance;
	}

	/**
	   * sets par
	   * @require par > 0
	   * @ensure 
	   */
	public void setPar(int par) {
		assert(par > 0);
		this.par = par;
	}

	/**
	   * gets par
	   * @require
	   * @ensure par > 0
	   */
	public int getPar() {
		assert(par > 0);
		return par;
	}

	/**
	   * sets hole header
	   * @require
	   * @ensure 
	   */
	public void setHoleHead(String holeHead) {
		this.holeHead = holeHead;
	}

	/**
	   * gets hole header
	   * @require
	   * @ensure return a string
	   */
	public String getHoleHead() {
		return holeHead;
	}

	/**
	   * sets hole value
	   * @require holeVal > 0
	   * @ensure 
	   */
	public void setHoleVal(int holeVal) {
		assert(holeVal > 0);
		this.holeVal = holeVal;
	}

	/**
	   * gets hole value
	   * @require
	   * @ensure holeVal > 0
	   */
	public int getHoleVal() {
		assert(holeVal > 0);
		return holeVal;
	}

	/**
	   * sets handicap
	   * @require handicap > 0
	   * @ensure 
	   */
	public void setHandicap(int handicap) {
		assert(handicap > 0);
		this.handicap = handicap;
	}

	/**
	   * gets handicap
	   * @require
	   * @ensure handicap > 0
	   */
	public int getHandicap() {
		assert(handicap > 0);
		return handicap;
	}	
}
